package com.shengruan.user.action;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.shengruan.admin.jdbc.ProductJdbc;
import com.shengruan.admin.vo.Product;
import com.shengruan.common.BaseAction;
import com.shengruan.common.Constants;

public class UserProductAction extends BaseAction {

    Logger logger = LoggerFactory.getLogger(getClass());

    private ProductJdbc productJdbc = (ProductJdbc) this.getJdbc(ProductJdbc.class);


    public void list() throws Exception {
        List<Product> bidedProductList = this.productJdbc.getBidedProduct(this.getCurrentUser().getId(), Constants.PRODUCT_DISABLE_DAYS);
        this.setRequest("bidedProductList", bidedProductList);
        this.forward("/user/user-bided-product-list.jsp");
    }
}
